<template>
  <ul>
    <li v-for="item in list">
<div><img :src="item.image" alt=""></div>
<div>{{ item.title }}</div>
<div>{{ item.price }}</div>
    </li>
  </ul>
</template>

<script setup>
import {ref,onMounted} from 'vue'
import request from '@/tool/request.js'
const list=ref([])
// pagination, pageNum
const pagination=ref(1)
onMounted(()=>{
  request.get('/list',{
    params:{
      pagination:pagination.value,
      pageNum:15
    }
  }).then(res=>{
    if(res.data.code==200){
      list.value=res.data.data
    }
  })
})
</script>

<style lang="scss" scoped>
ul{
  column-count: 2;
  column-gap: 10px;
}
</style>